#include <stdio.h>

//二维数组作为参数被传递，变成了数组指针
void PrintArray(int (*a)[3], int size)
{
    for(int i = 0; i < size; i++)
    {
        for(int j = 0; j < 3; j++)
        {
            printf("%d ",a[i][j]);
            //printf("%p ",&a[i][j]);
        }
        printf("\n");
    }
    return 0;
}
int main()
{
    int a[2][3] = 
    {
        {1,2,3},
        {4,5,6}
    };
    //printf("%ld\n", sizeof(a));
    //PrintArray(a,2);

    //printf("%p %p %p\n",a,&a,a[0]);
    //printf("%p %p %p\n",a+1, &a+1, &a[0]+1);、
    //printf("%d\n",**(a+1));
    //printf("%d\n",*(*(a+1)+1));
    //printf("%d\n",a[1][1]);


    //int (*p)[3] = a;
    //printf("%d %p\n",*p[1],*p[1]);
    //printf("%d\n",*(*(p+1)+1));
    //printf("%d\n",p[1][1]);

    // int (*p)[3] = a;
    // printf("%d\n",*(*(p+1)+1));

    int *p = a;
    printf("%d\n",*p);
    printf("%d\n",*(p+4));
    return 0;
}